﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.ServiceModel;

namespace QLNSClient
{
    public partial class uc_dsCanbo : UserControl
    {

        QLNSServiceReference.QLNSServiceClient sv = new QLNSServiceReference.QLNSServiceClient();

        public void LoadData()
        {
            gv_dsCanbo.DataSource = sv.getCB();
            lke_Donvi.Properties.DataSource = sv.getDMDV();
        }

        public uc_dsCanbo()
        {
            InitializeComponent();
        }

        private void uc_dsCanbo_Load(object sender, EventArgs e)
        {
            LoadData();
        }

        private void gv_dsCanbo_Click(object sender, EventArgs e)
        {
            
        }

        private void lke_Donvi_EditValueChanged(object sender, EventArgs e)
        {
            string a = lke_Donvi.EditValue.ToString();
            gv_dsCanbo.DataSource = sv.getdsCBtheoDV(a);

        }

        private void btn_All_Click(object sender, EventArgs e)
        {
            LoadData();
        }




        
    }
}
